
import javax.swing.JTextArea;


public class MyTextArea extends JTextArea
{
	private static final long serialVersionUID = 2586034409396615594L;

	@Override
	public void append(String text)
	{
		super.append(text+"\n");
	}
	
	public void appendNoNewLine(String text)
	{
		super.append(text);
	}
	
	public void line()
	{
		int width=this.getFontMetrics(this.getFont()).charWidth('-');
		int columns=(this.getWidth()-this.getMargin().right-this.getMargin().left)/width;
		for (int i=0;i<columns;i++)
			super.append("-");
		super.append("\n");
	}
}
